export enum E_ERROR_CODE {
  SUCCESS = 0,
  SERVER_UNREACHABLE = 1, // Can't find server
  SERVER_ERROR = 2, // Server side error
  REQUEST_FAILED = 3, // Request filed
  REQUEST_CANCELED = 4, // Request timeout or canceled
  UNAUTHORIZED = 5 // Need to login
}

export enum E_HTTP_CODE {
  NETWORK_ERROR = 0,
  SERVER_UNREACHABLE = 1, // Can't find server
  REQUEST_CANCELED = 4, // Request timeout or canceled
  HTTP_OK = 200,
  BAD_REQUEST = 400,
  UNAUTHORIZED = 401,
  FORBIDDEN = 403,
  NOT_FOUND = 404,
  METHOD_NOT_ALLOWED = 405,
  NOT_ACCEPTABLE = 406,
  PROXY_AUTHENTICATION_REQUIRED = 407,
  REQUEST_TIMEOUT = 408,
  CONFLICT = 409,
  GONE = 410,
  INTERNAL_SERVER_ERROR = 500,
  NOT_IMPLEMENTED = 501,
  BAD_GATEWAY = 502,
  SERVICE_UNAVAILABLE = 503,
  GATEWAY_TIMEOUT = 504,
  HTTP_VERSION_NOT_SUPPORTED = 505
}

export enum E_SERVER_ERROR_CODE {
  NOT_FRIEND_YET = 104107, // 还不是好友，需要添加好友
  // 还不是好友，需要添加好友v2
  NOT_FRIEND_YET_V2 = 104101,
  REFRESH_TOKEN_EXPIRED = 1031007, // refresh token已过期
  LOGIN_ON_OTHER_DEVICE = 1031032,
  SET_TIMING_MESSAGE_FAILED = 104112, // 设置定时消息错误，定时时间太短
  NO_SESSION_FOUND = 1032056 //  server没有找到对应的session，
}
